﻿using System;
using System.Collections.Generic;
using System.Text;

namespace T.FAS.Runtime.Metadata.Entity
{
    /// <summary>
    /// 元数据扩展属性
    /// </summary>
    public abstract class MetaDataExtPropertyHandler : IMetaDataExtPropertyHandler
    {
        //public abstract string GetUpdateSql(List<MetaDataExtProperty> propertyList);
        //public string GetPublicSql(List<MetaDataExtProperty> propertyList)
        //{
        //    string sql = string.Empty;
        //    if (propertyList != null && propertyList.Count > 0)
        //    {
        //        List<MetaDataExtProperty> propList = propertyList.FindAll(item => item.ExtSource == "Common");
        //        if (propList != null && propList.Count > 0)
        //        {
        //            foreach (MetaDataExtProperty prop in propList)
        //            {
        //                sql = string.Format("{0},[{1}]='{2}'", sql, prop.ColumnName, prop.GetValue());
        //            }

        //            return sql.Trim(',');
        //        }
        //    }

        //    return sql;
        //}
        /// <summary>
        /// 获取元数据扩展
        /// </summary>
        /// <param name="metaDataContent"></param>
        /// <returns></returns>
        public abstract Dictionary<string, string> GetExtProperty(IMetaDataContent metaDataContent);
    }
}
